From: Matthias Clasen Date: Sun, 5 Nov 2017 16:20:42 +0000 (-0500) Subject: wayland: Fix animated cursors X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~23^2~851 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22%22?a=commitdiff_plain;h=909330f3473a8f1c38196709677753a3c815f688;p=gtk4.git wayland: Fix animated cursors We must reset the image delay when stopping the timeout, otherwise the code setting it up thinks it is still running. This fixes cursor animation only working for the very first enter of a widget with an animated cursor, as seen in the cursors example in gtk4-demo. --- diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 4c7789b3e2..73ce17d87e 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -350,6 +350,7 @@ gdk_wayland_pointer_stop_cursor_animation (GdkWaylandPointerData *pointer) { g_source_remove (pointer->cursor_timeout_id); pointer->cursor_timeout_id = 0; + pointer->cursor_image_delay = 0; } pointer->cursor_image_index = 0;